package com.tensquare.search.dao;

import com.tensquare.search.pojo.ArticleSearch;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @Description：文章搜索数据访问层接口
 * @Author: liulei
 * @Date: 2019年10月27日
 * @Version: V1.0
 **/
public interface ArticleSearchDao extends ElasticsearchRepository<ArticleSearch, String> {

    /**
     * 根据 title或 content模糊搜索+分页
     * @param title
     * @param content
     * @param pageable
     * @return
     */
    public Page<ArticleSearch> findByTitleOrContentLike(String title, String content, Pageable pageable);
}
